package DailyPractice.Day20;

import java.util.Scanner;

/**
 * 字符串反转
 * @author lumin
 * @date 2022/05/17 17:31
 **/
public class Num1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        System.out.println(myReverse(str));
    }

    private static String myReverse(String str) {
        int left = 0;
        int right = str.length();
        while(left < right){
            swap(str.charAt(left),str.charAt(right));
            left++;
            right--;
        }
        return str;
    }

    private static void swap(char charAt, char charAt1) {
        char temp = charAt;
        charAt = charAt1;
        charAt1 = temp;
    }
}